import { createRouter, createWebHistory } from 'vue-router';
import type {RouteRecordRaw} from 'vue-router';
const routes:RouteRecordRaw[] = [
  {
    path: '/about',
    name: 'about',
    component: () => import('@/views/about/index.vue')
  },
  {
    path: '/error',
    name: 'error',
    component: () => import('@/views/error/index.vue')
  },
  {
    path: '/',
    name: 'home',
    component: () => import('@/views/home/index.vue'),
    children: [
      {
        path: 'list',
        name: 'home-list',
        component: () => import('@/views/home/list/index.vue')
      },
      {
        path: 'setting',
        name: 'home-setting',
        component: () => import('@/views/home/setting/index.vue')
      }
    ]
  },
  {
    path: '/login',
    name: 'login',
    component: () => import('@/views/login/index.vue')
  }
];
export default createRouter({
    history: createWebHistory(import.meta.env.BASE_URL),
    routes
});
